package eu.webhib.webblog.service.factory;

import eu.webhib.webblog.service.intf.*;
import eu.webhib.webblog.service.impl.*;

public class ServiceFactory {

   private static UserService userService;
   private static CategoryService categoryService;

   public static UserService getUserService() {
      if (userService == null) {
         userService = new UserServiceImpl();
      }
      return userService;
   }

   public static CategoryService getCategoryService() {
      if (categoryService == null) {
         categoryService = new CategoryServiceImpl();
      }
      return categoryService;
   }

   private ServiceFactory() {
   }
}
